//
//  LocalCache.h
//  lumihui
//
//  Created by oceans on 2018/10/27.
//  Copyright © 2018 ios. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface LocalCache : NSObject

+ (instancetype)shared;

/**用nsuserdefaults 缓存object, key不要带 ","*/
- (void)setPlistValue:(id)value forKey:(NSString *)key;

/**用nsuserdefaults 缓存bool, key不要带 ","*/
- (void)setPlistBool:(BOOL)value forKey:(NSString *)key;

/**获取nsuserdefaults 缓存的 object*/
- (id)getPlistValueForKey:(NSString *)key;

/**获取nsuserdefaluts 缓存的 bool*/
- (BOOL)getPlistBoolForKey:(NSString *)key;

/**退出登录时清理plist缓存*/
- (void)clearNSUserDefaultsValues;

/**清除全部缓存*/
- (void)clearAllCacheAndPlist;

- (void)removeCache;

- (void)removeCacheForKey:(NSString *)key;

- (void)CacheData:(NSData *)data forKey:(NSString *)key;

- (NSData *)GetCache:(NSString *)key;

- (BOOL)ExistsFile:(NSString *)key;
@end
